package com.lc.utils;

public class MapUtils {

    public static double calculateAmapLineDistance(double fromLongitude, double fromLatitude, double toLongitude, double toLatitude) {
        try {
            double var2 = fromLongitude;
            double var4 = fromLatitude;
            double var6 = toLongitude;
            double var8 = toLatitude;
            var2 *= 0.01745329251994329;
            var4 *= 0.01745329251994329;
            var6 *= 0.01745329251994329;
            var8 *= 0.01745329251994329;
            double var10 = Math.sin(var2);
            double var12 = Math.sin(var4);
            double var14 = Math.cos(var2);
            double var16 = Math.cos(var4);
            double var18 = Math.sin(var6);
            double var20 = Math.sin(var8);
            double var22 = Math.cos(var6);
            double var24 = Math.cos(var8);
            double[] var28 = new double[3];
            double[] var29 = new double[3];
            var28[0] = var16 * var14;
            var28[1] = var16 * var10;
            var28[2] = var12;
            var29[0] = var24 * var22;
            var29[1] = var24 * var18;
            var29[2] = var20;
            return (double) (Math.asin(Math.sqrt((var28[0] - var29[0]) * (var28[0] - var29[0]) + (var28[1] - var29[1]) * (var28[1] - var29[1]) + (var28[2] - var29[2]) * (var28[2] - var29[2])) / 2.0) * 1.27420015798544E7);
        } catch (Throwable var26) {
            var26.printStackTrace();
            return 0.0F;
        }

    }
}
